﻿import Vue from 'vue';
import {Header} from "mint-ui";
Vue.component(Header.name,Header);

import "mint-ui/lib/style.css";
//导入mui.css
import './lib/mui/css/mui.css';
import './lib/mui/css/icons-extra.css';

//导入路由
import VueRouter from 'vue-router';
Vue.use(VueRouter);
//导入轮播的组件
import { Swipe, SwipeItem,Button,Lazyload } from 'mint-ui';
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);
Vue.use(Lazyload);

//导入时间插件  npm i moment -D
import moment from 'moment'
Vue.filter("dateFormat",function(dateStr,pattern="YYY-MM-DD HH:mm:ss"){
    return moment(dateStr).format(pattern);
})
//导入vue-resource
import VueResource from 'vue-resource';
Vue.use(VueResource);
//设置请求数据的跟路径
Vue.http.options.root = "localdata"

import VuePreview from 'vue-preview'
Vue.use(VuePreview)

import vr from "./router.js"
import app from "./App.vue";

new Vue({
    el:"#app",
    render:h=>h(app),
    router:vr
})
